﻿using ServerListerner.Connections;

using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Net;
using System.Text;

namespace ServerListerner
{
    public interface IUDPConnection: IDisposable
    {
        Action<IUDPConnection, byte[]> OnReceived { get;set; }
        Action<IUDPConnection, string, Exception> OnError { get; set; }
        void Send(EndPoint point, byte[] data);
        void Send(IPAddress iP, int port, byte[] data);
        void Send(string ip, int port, byte[] data);
        EndPoint RemoteEndPoint { get; }
    }
}
